<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2017/7/27
 * Time: 16:04
 */

namespace Home\Model\Weixin;


use Think\Model;

class WeixinModel extends Model
{
    public function getWeixinInfo($weixin_id)
    {
        $map['id'] = $weixin_id;
        return $this->where($map)->field('id,nickname,headimgurl')->find();
    }

    public function getWeixin($openid)
    {
        $map['openid'] = $openid;
        return $this->where($map)->field('id,nickname,headimgurl')->find();
    }

    public function getSubscibe($openid)
    {
        $map['openid'] = $openid;
        return $this->where($map)->field('subscribe')->find();
    }
}